package com.useeinfo.oa.open.api.inspection;

import com.useeinfo.oa.common.utils.ResultUtil.ResultDto;
import com.useeinfo.oa.modules.inspection.biz.InsApplyOrderBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/mobile/insApply")
public class InsApplyOrderAPI {
    @Autowired
    private InsApplyOrderBiz insApplyOrderBiz;

    /**
     * 保存用户工单取消或者延期申请
     * @param inspectionOrderId
     * @param delayTime  延期时  延期时间
     * @param type cancel为取消申请 delay 为延期申请
     * @param reason 原因
     *               dictInfoId  申请分类
     * @return
     */
    @RequestMapping("/saveOrUpdate")
    public ResultDto saveOrUpdate(String inspectionOrderId, String delayTime, String type, String reason,String dictInfoId){
        return  insApplyOrderBiz.saveOrUpdate(inspectionOrderId,delayTime,type,reason,dictInfoId);
    }
}
